package com.kofan.shelter.web.controller;

import com.kofan.shelter.api.bean.JsonResult;
import com.kofan.shelter.api.entity.User;
import com.kofan.shelter.commons.util.annotation.NotLogin;
import com.kofan.shelter.web.service.IUserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/")
public class UserController {
    @Resource
    private IUserService userService;

    @NotLogin
    @RequestMapping("login")
    public JsonResult login(User user){
        return userService.login(user);
    }
}
